package
{
	import flash.display.Shape;
	import flash.display.Sprite;

	public class TestObject extends Sprite
	{
		private var objArr:Array;
		
		public function TestObject()
		{
			super();
			//this.preparation();
			
			var temp:SubClip = new SubClip;
			this.addChild(temp);
		}
		
		private function preparation():void
		{
			this.objArr = new Array();
			for(var i:uint = 0; i < 10; i++)
			{
				for(var j:uint = 0; j < 10; j++)
				{
					var obj:Object = new Object();
					obj.mc = makeRect();
					obj.selected = true;
					obj.point = 10;
					obj.position = {x:j*22,y:i*22};
					
					this.objArr.push(obj);
					
					obj.mc.x = obj.position.x;
					obj.mc.y = obj.position.y;
					this.addChild(obj.mc);
				}				
			}
			
			trace(this.objArr[7].mc.name);
			for(var str:String in this.objArr[7])
			{
				trace(str, this.objArr[7][str]);
			} 
		}
		
		private function makeRect():Shape
		{
			var temp:Shape = new Shape();
			temp.graphics.beginFill(0x000000);
			temp.graphics.drawRect(0, 0, 20,20);
			temp.graphics.endFill();
			
			return temp;	
		}
		
	}
}